import Vue from 'vue'
import Vuex from 'vuex'
// import city from './modules/city'

Vue.use(Vuex)

const store = () => new Vuex.Store({
    state:{
        testdata:'这是vuex的数据',
        userdata:'',
        imgcodehost:'http://39.108.122.107:1111/api'
    },
    mutations:{
        setuserdata(state,data){
            state.userdata = data
        }
    },
  modules: {
    // city,
  },
  actions: {
    // nuxtServerInit({ commit }, { req }) {
    //   if (req.session.user) {
    //     commit('city', req.session.user)
    //   }
    // }
  }
})

export default store
